package com._101aiot.test.feign.controller;

import com._101aiot.common.resultutil.CommonResult;
import com._101aiot.test.feign.feign.ProvideService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 把服务提供者的包 引入maven 直接调用api 接口
 */
@RestController
@RequestMapping("/feign-consumer")
@Api(value = "FeignConsumerController", tags = "测试feign消费服务")
public class FeignConsumerController {

    @Autowired
    private ProvideService provideService;

    @GetMapping("/consumer")
    public CommonResult consumer() {

        return provideService.getInfo();
    }

}
